/**
 * 注册插件组件
 * status === 0 不进行注册
 */
const componentsPlugin = {
    install(app){
        const plugins = require.context('./module', true, /\.(js)$/)
        plugins.keys().forEach(fileName => {
            const pluginsConfig = plugins(fileName)
            if(pluginsConfig.status !== 0){
                pluginsConfig.default(app)
            }
        })
    }
}

export default componentsPlugin